﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService
{
    public interface IMerchantBankCardService {

        #region 后台管理
        /// <summary>
        /// 获得银行卡列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<merchant_bank_card_dto> GetBankCards(MerchantBankCardQuery query);

        /// <summary>
        /// 通过Id获得银行卡
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        merchant_bank_card_dto_ex GetBankCard(long id);

        /// <summary>
        /// 审核银行卡
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="manageId"></param>
        /// <returns></returns>
        bool AuditBankCard(merchant_bank_card_dto dto, long manageId);
        #endregion
        /// <summary>
        /// 获得商户审核通过的银行卡（包括自动审核通过和审核通过的）
        /// </summary>
        /// <param name="merchantId"></param>
        /// <returns></returns>
        api_merchant_bank_card_dto GetApprovedBankCard(long merchantId);

        /// <summary>
        /// 通过Id获得银行卡
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        api_merchant_bank_card_dto GetBankCardById(long id);

        /// <summary>
        /// 通过商户Id获得银行卡
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        api_merchant_bank_card_dto GetBankCardByMerchantId(long merchantId);

        /// <summary>
        /// 新增或修改银行卡
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="merchantId"></param>
        /// <returns></returns>
        bool AddOrUpdateBankCard(edit_merchant_bank_card_dto dto, long merchantId);

        /// <summary>
        /// 删除银行卡
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool RemoveBankCard(long id);

    }
}
